const extensions = import.meta.glob('./Extensions/*.ts', { eager: true})

import Vue from 'vue';

import VueRouter from 'vue-router';
Vue.use(VueRouter)

import ElementUI from 'element-ui';
Vue.use(ElementUI)

import './utils/btnPermissions.js';

import tinymce from 'tinymce'
Vue.prototype.$tinymce = tinymce // 将全局tinymce对象指向给Vue作用域下
import 'tinymce/skins/content/default/content.css'
import 'tinymce/themes/silver'
import 'tinymce/icons/default/icons' // 解决了icons.js 报错Unexpected token '<'
import "tinymce/plugins/paste";
import "tinymce/plugins/image";
import "tinymce/plugins/link";
import "tinymce/plugins/code";
import "tinymce/plugins/table";
import "tinymce/plugins/lists";
import "tinymce/plugins/preview";
import "tinymce/plugins/autosave";


// 全局form校验
import * as validate from "./utils/validate"
Vue.prototype.$validate = validate;

import * as utilsSet from "./utils/utilsSet"
Vue.prototype.$utilsSet = utilsSet;
Vue.prototype.$baseApi = import.meta.env.VITE_BASE_API;

// 修改 Element UI 全局的 message 组件
import message from 'src/utils/once-message'
Vue.prototype.$message = message
Vue.prototype.isProject = true

import ElTreeSelect from 'el-tree-select'
Vue.use(ElTreeSelect)

Vue.config.productionTip = false

import 'tailwindcss/base.css'
import './styles/element-variables.scss'
import 'src/styles/index.scss'
import './icons'
import './permission'
import './main.css'

import AppVue from './App.vue';
import router from './router/index'
import store from './store'
const app = new Vue({
  render: h => h(AppVue),
  router,
  store,
  beforeCreate() {
    Vue.prototype.$bus = this
  },
})

app.$mount('#app')